package com.cennavi.mm.service;

import java.io.Serializable;
import java.util.ArrayList;

import com.cennavi.mm.astar.Projection;
import com.cennavi.mm.thrift.GPS;
import com.vividsolutions.jts.geom.Polygon;

/**
 * 小网格 60*60m,只存储和小网格相交的路链ID，不存储和小网格交叉端的几何形体
 * @author Mark
 *
 */
public class Cell  implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * 小网格ID号，二次网格ID+”_“+行号+”_“+列号
	 */
	private String cellid;
	
	/**
	 * 二次网格内的路链ID
	 */
	private ArrayList<Link> cellLinkIDs;

	ArrayList<Projection> prj;
	
	public int hitTimes = 0;
	
	public ArrayList<Projection> getPrj() {
		return prj;
	}

	public void setPrj(ArrayList<Projection> prj) {
		this.prj = prj;
	}

	public void setCellLinkIDs(ArrayList<Link> cellLinkIDs) {
		this.cellLinkIDs = cellLinkIDs;
	}

	private Polygon polygon;
	private GPS pgs;
	
	
	public GPS getPgs() {
		return pgs;
	}

	public void setPgs(GPS pgs) {
		this.pgs = pgs;
	}

	public Polygon getPolygon() {
		return polygon;
	}

	public void setPolygon(Polygon polygon) {
		this.polygon = polygon;
	}
	
	public Cell(GPS gps,String cellid,Polygon polygon) {
		super();
		this.cellid = cellid;
		this.pgs = gps;
		this.polygon = polygon;
	}
	public Cell(String cellid, ArrayList<Link> cellLinkIDs) {
		super();
		this.cellid = cellid;
		this.cellLinkIDs = cellLinkIDs;
	}

	public String getCellid() {
		return cellid;
	}

	public ArrayList<Link> getCellLinkIDs() {
		return cellLinkIDs;
	}
	
}
